/*
 *   Copyright (C) 2008 - 2009  FireBalls
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// includes
#include "Player.h"

Player *player;

Player::Player() {
    name = "Player1";
    coord.x = 6;
    coord.y = 6;

    level = 1;

    Points = 0;

    powerup = 0;

    Lives = 5;
}

void Player::setName(string str) {
    name = str;
}

string Player::getName() {
    return name;
}

void Player::setCoord(int x, int y) {
    coord.x += x;
    coord.y += y;
}

void Player::setSurface(SDL_Surface *surf) {
    Surf_Player = NULL;
    Surf_Player = surf;
}

SDL_Surface* Player::getSurface() {
    return Surf_Player;
}

int Player::getX() {
    return coord.x * 25 + 10 + GridX;
}

int Player::getY() {
    return coord.y * 25 + 10 + GridY;
}

int Player::getCoordX() {
    return coord.x;
}

int Player::getCoordY() {
    return coord.y;
}

int Player::getLevel() {
    return level;
}

void Player::setLevel(int i) {
    level = i;
}

void Player::nextLevel() {
    level += 1;
}

void Player::setCoordNormal() {
    coord.x = 6;
    coord.y = 6;
}

void Player::addToPoints(int i) {
    Points += i;
}

void Player::setPoints(int i) {
    Points = i;
}

int Player::getPoints() {
    return Points;
}

int Player::getLives() {
    return Lives;
}

void Player::setLives(int i) {
    Lives = i;
}

void Player::addToLives(int i) {
    Lives += i;
}

void Player::setPowerup(int i) {
    powerup = i;
}

int Player::getPowerup() {
    return powerup;
}

